package com.wy.timer.impl2;

/**
 * @author 美女
 * @date 2022/05/03 10:48
 **/
public abstract class MyTimerTask implements Comparable<MyTimerTask>{
    long runAt;
    abstract public void run();

    @Override
    public int compareTo(MyTimerTask o) {
        if(runAt<o.runAt){
            return -1;
        }else if(runAt>o.runAt){
            return 1;
        }else {
            return 0;
        }
    }
}
